package nowcoder;
/**
 * 36898-参数解析
 * 链接：https://www.nowcoder.com/practice/668603dc307e4ef4bb07bcd0615ea677?tpId=37&&tqId=21297&rp=1&ru=/activity/oj&qru=/ta/huawei/question-ranking
 */
import java.util.*;
public class Day13_1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String str = input.nextLine();

        List<String> list = new ArrayList<>();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            if(c != ' ' && c != '"'){
                sb.append(c);
            }else if(c == ' ' && sb.length() != 0){
                //遇到空格直接输出
                list.add(sb.toString());
                sb.delete(0, sb.length());
            }else if(c == '"'){
                //遇到前引号
                while(++i < str.length() && str.charAt(i) != '"'){
                    sb.append(str.charAt(i));
                }
                list.add(sb.toString());
                sb.delete(0, sb.length());
            }
        }
        //添加最后一个字段
        list.add(sb.toString());

        //输出
        System.out.println(list.size());
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
    }
}
